package main

import "fmt"

func main() {
	p := &Property{11}
	fmt.Println(p.GetValue())
	p.SetValue(22)
	fmt.Println(p.GetValue())

	p = p.Add(p)
	fmt.Println(p.GetValue())
}

type Property struct {
	value int
}

func (p *Property) SetValue(v int) {
	p.value = v
}

func (p *Property) GetValue() int {
	return p.value
}

func (p *Property) Add(p2 *Property) *Property {
	return &Property{p.GetValue() + p2.GetValue()}
}
